package com.study.spring.自定义注解.自定义加载;

import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
import org.springframework.core.type.filter.AnnotationTypeFilter;

/**
 * ClassPathBeanDefinitionScanner
 */
public class MyScanner extends ClassPathBeanDefinitionScanner {
    public MyScanner(BeanDefinitionRegistry registry) {
        super(registry, false);
    }

    public void registIncludeFilter(){
        addIncludeFilter(new AnnotationTypeFilter(MyComponent.class));
    }
}
